﻿<ion-view title="人员列表" ng-controller="ContactCtrl">
    <div class="bar bar-header bar-balanced item-input-inset">
        <label class="item-input-wrapper">
            <i class="icon ion-ios-search placeholder-icon"></i>
            <input type="search" placeholder="Search" ng-model="searchKey">
        </label>
        <button class="button button-clear" ng-click="searchKey=undfined">
            取消
        </button>
    </div>
    <ion-content delegate-handle="mainScroll">
        <ion-list class="rj-list">
            <ion-item class="rj-item">
                <div class="rj-contacts-pic rj-blue-bgc">
                    <i class="ion-person-add"></i>
                </div>
                <h2>常用</h2>
            </ion-item>
            <ion-item class="rj-contacts-item" ng-repeat="group in userList|filter:searchKey">
                <div class="rj-contacts-index-bar" id="{{::group.Tag}}">{{::group.Tag}}</div>
                <ion-list class="rj-list">
                    <ion-item class="rj-item" ng-repeat="user in group.Users">
                        <div class="rj-contacts-pic">
                            <i class="ion-android-contact positive"></i>
                        </div>
                        <h2 ng-click="onSelect(user)">{{::user.UserName}}
                            <span class="rj-description">{{::user.Department}}</span>
                            <ion-checkbox ng-model="user.Selected" class="checkbox-assertive inline pull-right"></ion-checkbox>
                        </h2>
                    </ion-item>
                </ion-list>
            </ion-item>
        </ion-list>
    </ion-content>
    <div class="rj-contacts-right-bar" ng-position-middle on-touch="contacts_right_bar_touched($event)">
        <div ng-repeat="i in tags track by $index">{{::i}}</div>
    </div>
    <div class="rj-contacts-middle-bar" ng-show="selected.show">
        {{selected.tag}}
    </div>
    <div class="bar bar-subfooter bar-calm" ng-click="ok()">
        <div class="title">确定</div>
    </div>
</ion-view>
